package com.ruoyi.employee1.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.employee1.mapper.ErpEmployeeMapper;
import com.ruoyi.employee1.domain.ErpEmployee;
import com.ruoyi.employee1.service.IErpEmployeeService;

/**
 * 员工Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-28
 */
@Service
public class ErpEmployeeServiceImpl implements IErpEmployeeService 
{
    @Autowired
    private ErpEmployeeMapper erpEmployeeMapper;

    /**
     * 查询员工
     * 
     * @param employeeId 员工主键
     * @return 员工
     */
    @Override
    public ErpEmployee selectErpEmployeeByEmployeeId(Long employeeId)
    {
        return erpEmployeeMapper.selectErpEmployeeByEmployeeId(employeeId);
    }

    /**
     * 查询员工列表
     * 
     * @param erpEmployee 员工
     * @return 员工
     */
    @Override
    public List<ErpEmployee> selectErpEmployeeList(ErpEmployee erpEmployee)
    {
        return erpEmployeeMapper.selectErpEmployeeList(erpEmployee);
    }

    /**
     * 新增员工
     * 
     * @param erpEmployee 员工
     * @return 结果
     */
    @Override
    public int insertErpEmployee(ErpEmployee erpEmployee)
    {
        return erpEmployeeMapper.insertErpEmployee(erpEmployee);
    }

    /**
     * 修改员工
     * 
     * @param erpEmployee 员工
     * @return 结果
     */
    @Override
    public int updateErpEmployee(ErpEmployee erpEmployee)
    {
        return erpEmployeeMapper.updateErpEmployee(erpEmployee);
    }

    /**
     * 批量删除员工
     * 
     * @param employeeIds 需要删除的员工主键
     * @return 结果
     */
    @Override
    public int deleteErpEmployeeByEmployeeIds(Long[] employeeIds)
    {
        return erpEmployeeMapper.deleteErpEmployeeByEmployeeIds(employeeIds);
    }

    /**
     * 删除员工信息
     * 
     * @param employeeId 员工主键
     * @return 结果
     */
    @Override
    public int deleteErpEmployeeByEmployeeId(Long employeeId)
    {
        return erpEmployeeMapper.deleteErpEmployeeByEmployeeId(employeeId);
    }
}
